home *** CD-ROM | disk | FTP | other *** search
- on exitFrame
- global OnceCheck, Food
- if OnceCheck = 0 then
- cursor(-1)
- set OnceCheck to 1
- repeat with i = 3 to 20
- if ((i > 2) and (i < 8)) or ((i > 12) and (i < 16)) or (i = 36) or (i = 37) then
- set the cursor of sprite i to [34, 35]
- end if
- end repeat
- set the cursor of sprite 7 to 0
- set x to the number of lines in the text of member Food
- set tarHow to line x - 3 of the text of member Food
- repeat with i = 3 to 8
- puppetSprite(i, 1)
- end repeat
- set the member of sprite 7 to member Food of castLib "small Picts"
- set the member of sprite 6 to member "disabled"
- end if
- if not (the visible of sprite 19) and not (the visible of sprite 31) and ((Food = "food4") or (Food = "food7") or (Food = "food8")) then
- set the visible of sprite 36 to 1
- set the visible of sprite 37 to 1
- set the visible of sprite 27 to 1
- set the visible of sprite 28 to 1
- set the cursor of sprite 27 to [34, 35]
- set the cursor of sprite 28 to [34, 35]
- else
- set the visible of sprite 36 to 0
- set the visible of sprite 37 to 0
- set the visible of sprite 27 to 0
- set the visible of sprite 28 to 0
- end if
- forget(window "notes")
- go(the frame)
- end
-
- on mouseDown
- global checkPress
- set checkPress to the clickOn
- set bDown to the clickOn
- if (bDown > 3) and (bDown < 6) then
- set the member of sprite bDown to member ("PrepBtn" & bDown - 2)
- else
- if bDown = 3 then
- set the member of sprite bDown to member "foodBtn"
- else
- if bDown = 6 then
- if (the visible of sprite 19 = 1) or (the visible of sprite 31 = 1) then
- set the member of sprite bDown to member "foodBtn2"
- end if
- else
- if bDown = 24 then
- set the member of sprite 24 to member "shopDelete" of castLib "objects"
- else
- if bDown = 25 then
- set the member of sprite 25 to member "shopClear" of castLib "objects"
- else
- if bDown > 41 then
- buttonPressedDown(bDown, "objects")
- end if
- end if
- end if
- end if
- end if
- end if
- updateStage()
- if ((bDown > 2) and (bDown < 7)) or (bDown = 24) or (bDown = 25) or (bDown > 41) then
- repeat while the mouseDown
- end repeat
- set the member of sprite bDown to member "origin"
- end if
- end
-
- on mouseUp
- global checkPress, Food, gRecNumber, goOn, Navigate, RecipeNum
- set checkPress2 to the clickOn
- if checkPress = checkPress2 then
- set bUp to the clickOn
- if (bUp > 2) and (bUp < 7) then
- set the member of sprite bUp to member "Origin"
- if bUp = 5 then
- set the member of sprite 6 to member "origin"
- repeat with i = 19 to 25
- set the visible of sprite i to 0
- case i of
- 20, 21, 23, 24, 25:
- set the cursor of sprite i to 0
- end case
- end repeat
- set the cursor of sprite 35 to [34, 35]
- set the visible of sprite 34 to 0
- set the visible of sprite 35 to 0
- repeat with i = 31 to 32
- set the visible of sprite i to 1
- end repeat
- set the visible of sprite 31 to 1
- set the visible of sprite 32 to 1
- set foodNum to value(char 5 of Food)
- set goOn to 1
- set RecipeNum to 174 + foodNum
- set the visible of sprite 40 to 1
- set the cursor of sprite 40 to [34, 35]
- forget(window "notes")
- else
- if bUp = 4 then
- set the member of sprite 6 to member "origin"
- set the visible of sprite 16 to 1
- repeat with i = 19 to 25
- set the visible of sprite i to 1
- case i of
- 20, 21, 23, 24, 25:
- set the cursor of sprite i to [34, 35]
- end case
- end repeat
- set the cursor of sprite 35 to [34, 35]
- set the visible of sprite 34 to 1
- set the visible of sprite 35 to 1
- repeat with i = 31 to 33
- set the visible of sprite i to 0
- end repeat
- puppetSprite(24, 1)
- puppetSprite(25, 1)
- set the visible of sprite 16 to 1
- set the visible of sprite 40 to 1
- set the cursor of sprite 40 to [34, 35]
- else
- if bUp = 3 then
- set Navigate to "food"
- set dest to "entertainment"
- set x to the number of lines in field "backField"
- put marker(0) into line x + 1 of field "backField"
- clearPuppets()
- go(marker(dest))
- else
- if bUp = 6 then
- set the member of sprite 6 to member "disabled"
- updateStage()
- repeat while the mouseDown
- end repeat
- forget(window "notes")
- repeat with i = 19 to 25
- set the visible of sprite i to 0
- end repeat
- puppetSprite(24, 0)
- puppetSprite(25, 0)
- repeat with i = 31 to 35
- set the visible of sprite i to 0
- end repeat
- forget(window "notes")
- set the visible of sprite 40 to 0
- set the cursor of sprite 40 to 0
- end if
- end if
- end if
- end if
- else
- if bUp = 24 then
- set the member of sprite 24 to member "origin"
- set lastLine to the number of lines in field "shop2"
- set i to 1
- repeat with j = 1 to lastLine
- if the foreColor of line i of field "shop2" = 35 then
- delete line i of field "shop2"
- delete line i of field "shop1"
- next repeat
- end if
- set i to i + 1
- end repeat
- set the foreColor of field "shop1temp" to 204
- set the foreColor of field "shop2temp" to 204
- set the text of field "shop1temp" to line 1 to 10 of field "shop1"
- set the text of field "shop2temp" to line 1 to 10 of field "shop2"
- else
- if bUp = 25 then
- set the member of sprite 25 to member "origin"
- set the foreColor of field "shop1" to 204
- set the foreColor of field "shop2" to 204
- set the text of field "shop1" to EMPTY
- set the text of field "shop2" to EMPTY
- set the foreColor of field "shop1temp" to 204
- set the foreColor of field "shop2temp" to 204
- set the text of field "shop1temp" to EMPTY
- set the text of field "shop2temp" to EMPTY
- else
- if bUp > 41 then
- buttonPressedUp(bUp, "objects")
- end if
- end if
- end if
- end if
- end if
- end
-